package com.sunrise.xdoc.entity.store;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

@Entity
@Table(name = "store_chi_tiet_nhap_kho")
@Inheritance(strategy = InheritanceType.JOINED)
public class ChiTietNhapKho extends AbstractChiTietKho {
	private PhieuNhapKho phieuNhapKho;
	private Long donGiaNhap;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "phieu_nhap_kho_id")
	@NotNull
	public PhieuNhapKho getPhieuNhapKho() {
		return phieuNhapKho;
	}

	public void setPhieuNhapKho(PhieuNhapKho phieuNhapKho) {
		this.phieuNhapKho = phieuNhapKho;
	}

	@Column(name = "don_gia_nhap")
	public Long getDonGiaNhap() {
		return donGiaNhap;
	}

	public void setDonGiaNhap(Long donGiaNhap) {
		this.donGiaNhap = donGiaNhap;
	}
}
